package com.liu.service.impl;

import com.liu.entity.Hospital;
import com.liu.mapper.AreaMapper;
import com.liu.entity.Area;
import com.liu.service.AreaService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Area)表服务实现类
 *
 * @author makejava
 * @since 2023-01-30 19:32:40
 */
@Service("AreaServiceImpl")
@Transactional
public class AreaServiceImpl implements AreaService {
    @Resource
    private AreaMapper areaMapper;


    @Override
    public List<String> findProvince() {
        return this.areaMapper.findProvince();
    }

    @Override
    public List<Area> findCityByPro(Integer id) {
        return this.areaMapper.findCityByPro(id);
    }

    @Override
    public Area queryById(Integer id) {
        return this.areaMapper.queryById(id);
    }

    @Override
    public List<Area> findAllArea() {
        return this.areaMapper.findAllArea();
    }

    @Override
    public List<Area> queryAllByLimit(Integer pageNum, Integer pageSize, String province, String city) {
        return this.areaMapper.queryAllByLimit(pageNum,pageSize,province,city);
    }

    @Override
    public long count(String province, String city) {
        return this.areaMapper.count(province,city);
    }

    @Override
    public int insert(Area area) {
        return this.areaMapper.insert(area);
    }

    @Override
    public int insertBatch(List<Area> entities) {
        return this.areaMapper.insertBatch(entities);
    }

    @Override
    public int update(Area area) {
        return this.areaMapper.update(area);
    }

    @Override
    public int deleteById(Integer id) {
        return this.areaMapper.deleteById(id);
    }

    @Override
    public int deleteByIds(List<Integer> ids) {
        return this.areaMapper.deleteByIds(ids);
    }

    @Override
    public List<Hospital> findHosById(Integer id) {
        return this.areaMapper.findHosById(id);
    }
}
